namespace UnitTestInjector.Exceptions
{
    #region Usings

    using Localizations;
    using System;
    using System.Globalization;

    #endregion Usings

    public sealed class IsInstanceOfTypeAssertionFailedException : AssertionFailedException
    {
        internal IsInstanceOfTypeAssertionFailedException(Type type, object value)
            : base(GenerateExceptionMessage(type, value))
        {
        }

        private static string GenerateExceptionMessage(Type type, object value)
        {
            return string.Format(CultureInfo.CurrentCulture,
                Strings.IsInstanceOfTypeAssertionFailedExceptionMessage, type.FullName, value.ToSafeString());
        }
    }
}